http: set the HTTP status on directory listing
authorGiuseppe Scrivano <gscrivan@redhat.com>
Tue, 7 Oct 2014 11:10:08 +0000 (13:10 +0200)
committerGiuseppe Scrivano <gscrivan@redhat.com>
Tue, 7 Oct 2014 11:19:36 +0000 (13:19 +0200)
Fix a HTTP response header like the following:

HTTP/1.1 0 (null)
Server: ostree-httpd libsoup/2.48.0
Date: Tue, 07 Oct 2014 11:19:22 GMT
Content-Type: text/html
Content-Length: 12533

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
src/ostree/ot-builtin-trivial-httpd.c

index e8c06e37e58ce19ca52d6f6f5842ab729a9eb677..5ca1e4bf7774401db4eb6eba60f47abfeffff6a7 100644 (file)
@@ -205,6 +205,7 @@ do_get (OtTrivialHttpd    *self,
               soup_message_set_response (msg, "text/html",
                                          SOUP_MEMORY_TAKE,
                                          listing->str, listing->len);
+              soup_message_set_status (msg, SOUP_STATUS_OK);
               g_string_free (listing, FALSE);
             }
         }